package net.melon.sysres.inst.struts2;

import javax.inject.Inject;

import net.esj.basic.core.engine.util.logging.Logger;
import net.esj.basic.core.engine.util.logging.LoggerAware;
import net.esj.basic.core.engine.util.logging.LoggerFactory;
import net.esj.basic.plugins.struts2.Immit;
import net.melon.sysres.manager.SystemManager;
import net.melon.sysres.pojo.SysProperty;

public class PropertyAction extends AbstractSysresAction<SysProperty,SysProperty> {

	private SystemManager systemManager;
	
	@Override
	public void doAdd() throws Exception {
		super.doAdd();
		systemManager.loadProperties(true);//重新加载
	}

	
	
	@Override
	protected void afterDelete() {
		systemManager.loadProperties(true);//重新加载
	}

	@Override
	protected void afterUpdate() {
		systemManager.loadProperties(true);//重新加载
	}

	public SysProperty getEntity() {
		return entity;
	}

	public void setEntity(SysProperty entity) {
		this.entity = entity;
	}

	@Inject
	public void setSystemManager(SystemManager systemManager) {
		this.systemManager = systemManager;
	}

}
